package com.ljtxxhwj.myblob.service.impl;

import com.ljtxxhwj.myblob.mapper.UserMapper;
import com.ljtxxhwj.myblob.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    private final UserMapper userMapper;

    @Autowired
    public UserServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public void updateUserName(Integer userId, String newUserName) {
        userMapper.updateUserName(userId, newUserName);
    }

    @Override
    public void updateUserPassword(Integer userId, String newUserPassword) {
        userMapper.updateUserPassword(userId, newUserPassword);
    }

    @Override
    public void updateUserPic(Integer userId, String newUserPic) {
        userMapper.updateUserPic(userId, newUserPic);
    }

    @Override
    public void updateUserIntroduce(Integer userId, String newUserIntroduce) {
        userMapper.updateUserIntroduce(userId, newUserIntroduce);
    }

    @Override
    public void updateUserPhone(Integer userId, String newUserPhone) {
        userMapper.updateUserPhone(userId, newUserPhone);
    }

    @Override
    public void updateUserEmail(Integer userId, String newUserEmail) {
        userMapper.updateUserEmail(userId, newUserEmail);
    }
}
